<!DOCTYPE html>
<html ng-app="app" ng-controller="indexCtrl">

	<head lang="en">
		<meta charset="UTF-8">
		<meta http-equiv="Expires" content="0">
		<meta http-equiv="Pragma" content="no-cache">
		<meta http-equiv="Cache-control" content="no-cache">
		<meta http-equiv="Cache" content="no-cache">
		<title>广告投放-广告主</title>
		<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" id="favicon">
		<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css" />
		<link rel="stylesheet" href="css/bootstrap-datetimepicker.min.css" />
		<link rel="stylesheet" href="css/base.css" />
		<link rel="stylesheet" href="modules/agent/auAudiences/agAudiences.css" />
		<link rel="stylesheet" href="../../oem/css/common.css" />
		<style>
			.ng-hide {
				display: none;
			}
		</style>
	</head>

	<body>
		<div class="nav_top">
			<div class="logo fl" id="logo">
			</div>
			<ul class="nav_list fl">
				<!-- ngIf: permission.view['首页'] -->
				<li ng-if="permission.view['首页']" class="ng-scope">
					<a ui-sref="agent.home" ui-sref-active="active" href="./agentIndex.html" class="">首页</a>
				</li>
				<!-- end ngIf: permission.view['首页'] -->
				<!-- ngIf: permission.view['投放管理'] -->
				<li ng-if="permission.view['投放管理']" class="ng-scope">
					<!--<a ui-sref="agent.delivery" ui-sref-active="active">投放管理</a>-->
					<a href="./active.html" class="toFirstSub active">投放管理</a>
					<ul class="nav_dropdown" style="width: 1903px;">
						<!-- ngIf: permission.view['投放管理'].sub['活动管理'] -->
						<li ng-if="permission.view['投放管理'].sub['活动管理']" class="ng-scope">
							<a href="./active.html" ui-sref-active="active" ui-sref="agent.delivery.active" class="">活动管理</a>
						</li>
						<!-- end ngIf: permission.view['投放管理'].sub['活动管理'] -->
						<!-- ngIf: permission.view['投放管理'].sub['订单管理'] -->
						<li ng-if="permission.view['投放管理'].sub['订单管理']" class="ng-scope">
							<a href="./order.html" ui-sref-active="active" ui-sref="agent.delivery.order" class="">订单管理</a>
						</li>
						<!-- end ngIf: permission.view['投放管理'].sub['订单管理'] -->
						<!-- ngIf: permission.view['投放管理'].sub['素材信息'] -->
						<li ng-if="permission.view['投放管理'].sub['素材信息']" class="ng-scope">
							<a href="./creative.html" ui-sref-active="active" ui-sref="agent.delivery.creative" class="">素材信息</a>
						</li>
						<!-- end ngIf: permission.view['投放管理'].sub['素材信息'] -->
						<!-- ngIf: permission.view['投放管理'].sub['APP监测'] -->
						<li ng-if="permission.view['投放管理'].sub['APP监测']" class="ng-scope">
							<a href="./audiences.html" ui-sref-active="active" ui-sref="agent.delivery.audiences" class="">监测管理</a>
						</li>
						<!-- end ngIf: permission.view['投放管理'].sub['APP监测'] -->
						<!-- ngIf: hasDepot -->
					</ul>
				</li>
				<!-- end ngIf: permission.view['投放管理'] -->
				<!-- ngIf: permission.view['报表中心'] -->
				<li ng-if="permission.view['报表中心']" class="ng-scope">
					<!--<a ui-sref="agent.report" ui-sref-active="active">报表</a>-->
					<a href="./baoBiao.html" class="toFirstSub" ng-class="{'active':$state.includes('agent.report.*')}">报表中心</a>
					<ul class="nav_dropdown" style="width: 1903px;">
						<!-- ngIf: permission.view['报表中心'].sub['效果报表'] -->
						<li ng-if="permission.view['报表中心'].sub['效果报表']" class="ng-scope">
							<a href="./baoBiao.html" ui-sref-active="active" ui-sref="agent.report.effect({'activeID':'0','activeName':'0','orderID':'0','orderName':'0'})" class="">效果报表</a>
						</li>
						<!-- end ngIf: permission.view['报表中心'].sub['效果报表'] -->
						<li ng-if="permission.view['合约报表'].sub['效果报表']" class="ng-scope">
							<a href="./heyuebaobiao.html" ui-sref-active="active" ui-sref="agent.report.effect({'activeID':'0','activeName':'0','orderID':'0','orderName':'0'})" class="">合约报表</a>
						</li>
					</ul>
				</li>
				<!-- end ngIf: permission.view['报表中心'] -->
				<!-- ngIf: permission.view['系统管理'] -->
				<li ng-if="permission.view['系统管理']" class="ng-scope">
					<a href="./baseInfo.html" class="toFirstSub" ng-class="{'active':$state.includes('agent.manage.*')}">系统管理</a>
					<ul class="nav_dropdown" style="width: 1903px;">
						<!-- ngIf: permission.view['系统管理'].sub['基本信息'] -->
						<li ng-if="permission.view['系统管理'].sub['基本信息']" class="ng-scope">
							<a href="./baseInfo.html" ui-sref-active="active" ui-sref="agent.manage.baseInfo" class="">基本信息</a>
						</li>
						<!-- end ngIf: permission.view['系统管理'].sub['基本信息'] -->
						<!-- ngIf: permission.view['系统管理'].sub['资质管理'] -->
						<li ng-if="permission.view['系统管理'].sub['资质管理']" class="ng-scope">
							<a href="./qualifications.html" ui-sref-active="active" ui-sref="agent.manage.qualifications" class="">资质管理</a>
						</li>
						<!-- end ngIf: permission.view['系统管理'].sub['资质管理'] -->
					</ul>
				</li>
				<!-- end ngIf: permission.view['系统管理'] -->
				<!-- ngIf: permission.view['财务管理'] -->
				<li ng-if="permission.view['财务管理']" class="ng-scope">
					<!--<a ui-sref="agent.finance" ui-sref-active="active">财务管理</a>-->
					<a href="./caiwu.html" class="toFirstSub" ng-class="{'active':$state.includes('agent.finance.*')}">财务管理</a>
					<ul class="nav_dropdown" style="width: 1903px;">
						<!-- ngIf: permission.view['财务管理'].sub['财务信息'] -->
						<li ng-if="permission.view['财务管理'].sub['财务信息']" class="ng-scope">
							<a href="./caiwu.html" ui-sref-active="active" ui-sref="agent.finance.trade" class="">财务信息</a>
						</li>
						<!-- end ngIf: permission.view['财务管理'].sub['财务信息'] -->
					</ul>
				</li>
				<!-- end ngIf: permission.view['财务管理'] -->
			</ul>
			<div class="user">
				<div class="user-avatar"></div>
				<div class="user-info">
					<p ng-bind="advUser.loginName" class="ng-binding">昌投网络科技-C1</p>
					<p ng-bind="advUser.name" class="ng-binding">上海昌投网络科技有限公司1</p>
				</div>
				<ul class="user-list">
					<li class="ng-binding">余额：</li>
					<li ng-show="permission.act['退出登录']" ng-click="logout()" class="">退出登录</li>
				</ul>
			</div>
		</div>
		<ui-view class="ng-scope">
			<!-- uiView:  -->
			<ui-view class="ng-scope">
				<!-- uiView:  -->
				<ui-view class="ng-scope">
					<div class="audiences-page page ng-scope">
						<h3 class="page-title">监测管理</h3>

						<div class="lp-info-box">
							<div class="info-content">
								<div class="info-title"> 页面嵌入监测代码后，需要对落地页添加宏后填写至素材落地页地址中以便监测生效；<br> 会遇到如下两种情况： </div>
								<h3><span>1</span>当落地页地址中存在"?"，如`http://www.a.com/?a=b&amp;c=d....x=y` 添加如下字符串至末尾</h3>
								<p>&amp;adhub_IMEI=__IMEI__&amp;adhub_IMEI_MD5=__IMEI_MD5__&amp;adhub_ANDROIDID=__ANDROIDID__&amp;adhub_ANDROIDID_MD5=__ANDROIDID_MD5__&amp;adhub_IDFA=__IDFA__&amp;adhub_IDFA_MD5=__IDFA_MD5__
								</p>
								<p class="info-font">最终结果为：</p>
								<p>http://www.a.com/?a=b&amp;c=d....x=y&amp;adhub_IMEI=__IMEI__&amp;adhub_IMEI_MD5=__IMEI_MD5__&amp;adhub_ANDROIDID=__ANDROIDID__&amp;adhub_ANDROIDID_MD5=__ANDROIDID_MD5__&amp;adhub_IDFA=__IDFA__&amp;adhub_IDFA_MD5=__IDFA_MD5__
								</p>
								<h3><span>2</span>当落地页地址不存在"?"时，比如`http://www.a.com/1/2/3`，添加如下字符串至末尾</h3>
								<p>?adhub_IMEI=__IMEI__&amp;adhub_IMEI_MD5=__IMEI_MD5__&amp;adhub_ANDROIDID=__ANDROIDID__&amp;adhub_ANDROIDID_MD5=__ANDROIDID_MD5__&amp;adhub_IDFA=__IDFA__&amp;adhub_IDFA_MD5=__IDFA_MD5__
								</p>
								<p class="info-font">最终结果为：</p>
								<p>http://www.a.com/1/2/3?adhub_IMEI=__IMEI__&amp;adhub_IMEI_MD5=__IMEI_MD5__&amp;adhub_ANDROIDID=__ANDROIDID__&amp;adhub_ANDROIDID_MD5=__ANDROIDID_MD5__&amp;adhub_IDFA=__IDFA__&amp;adhub_IDFA_MD5=__IDFA_MD5__
								</p>
							</div>
							<div class="btn-group"> <button class="dsp-btn btn-red" onclick="closeLayer()">关闭</button>
							</div>
						</div>
						<div class="filter-box">
							<button class="dsp-btn btn-blue" onclick="showMask(1);">创建到达监测站点</button>
							<button class="dsp-btn btn-green" onclick="showInfo();">查看落地页修改用例</button>

						</div>
						<div class="table-box">
							<div class="table-title">
								<h3 class="table-title-font">wap监测管理</h3>
							</div>
							<table>
								<thead>
									<tr>
										<th style="width: 44px;"></th>
										<th>状态</th>
										<th>到达站点名称</th>
										<th style="width: 300px;">到达站点url</th>
										<th>操作</th>
									</tr>
								</thead>

								<tbody class="roleList" id="list_box">

								</tbody>

							</table>
							<div id="pageToolbar" class="page">
								<div id="Paging" class="ui-paging-container">
									<ul>
										<li class="js-page-first js-page-action ui-pager" data-page="1">首页</li>
										<li class="js-page-prev js-page-action ui-pager" data-page="">上一页</li>

										<li class="ui-paging-toolbar">
											<span>跳转到</span><input type="text" class="ui-paging-count"> 页 &nbsp;&nbsp;总共：
											<span class="js-page-total" style="color: #4A9DD2;"></span>&nbsp;&nbsp;页
											<select class="ui-select-pagesize">
												<option value="10">每页展示10条/页</option>
												<option value="20">每页展示20条/页</option>
												<option value="50">每页展示50条/页</option>
											</select>
										</li>
										<li class="js-page-last js-page-action ui-pager" data-page="">末页</li>
										<li class="js-page-next js-page-action ui-pager" data-page="">下一页</li>
									</ul>
								</div>
							</div>
						</div>

						<div class="copy-box">
							<textarea class="form-control ng-binding" readonly id='foo'>&lt;script src="http://res1.hubcloud.com.cn/sdk/monitor.js"&gt;&lt;/script&gt;&lt;script&gt;adhub_monitor({src: "http://v.ads.hubcloud.com.cn/m/arrive/v1?t=arrive&amp;s=165&amp;uid={userID}&amp;idfa={idfa}&amp;idfa_md5={idfa_md5}&amp;imei={imei}&amp;imei_md5={imei_md5}&amp;mac={mac}&amp;mac_md5={mac_md5}&amp;androidid={androidid}&amp;androidid_md5={androidid_md5}",action: "arrive"})&lt;/script&gt;</textarea>
							<div class="btn-group">
								<input class="dsp-btn btn-green copy ng-isolate-scope" type="submit" value="复制" id='deorilink' data-clipboard-target='#foo' aria-label="已成功复制！" ng-copyable="" copy-text="code">
								<button class="dsp-btn btn-red" onclick="closeLayer()">关闭</button>
							</div>
						</div>

						<div class="modal fade" tabindex="-1" id="arriveModal">
							<div class="modal-dialog">
								<div class="modal-content">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal"><span
                                            aria-hidden="true">×</span></button>
										<h4 class="modal-title">创建到达监测站点</h4>
									</div>
									<div class="modal-body">

										<div class="form-group">
											<label>站点名称：</label>
											<input type="text" class="form-control ng-pristine ng-untouched ng-valid ng-empty" id="zhanDianMingCheng">
										</div>
										<div class="form-group">
											<label>站点url：</label>
											<input type="text" class="form-control ng-pristine ng-untouched ng-valid ng-empty" id="zhanDianUrl">
										</div>
									</div>
									<div class="modal-footer">
										<button class="dsp-btn btn-blue" onclick="addArrive()">确定</button>
										<button class="dsp-btn btn-white2" data-dismiss="modal">取消</button>
									</div>
								</div>
							</div>
						</div>

						<div class="modal fade" tabindex="-1" id="conversionModal">
							<div class="modal-dialog">
								<div class="modal-content">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal"><span
                                            aria-hidden="true">×</span></button>
										<h4 class="modal-title">创建到达监测站点</h4>
									</div>
									<div class="modal-body">

										<div class="form-group">
											<label>监测点名称：</label>
											<input type="text" class="form-control ng-pristine ng-untouched ng-valid ng-empty" id="jianCeDianMingCheng">
										</div>
										<div class="form-group">
											<label>备注：</label>
											<input type="text" class="form-control ng-pristine ng-untouched ng-valid ng-empty" id="beiZhu">
										</div>
									</div>
									<div class="modal-footer">
										<button class="dsp-btn btn-blue" onclick="addConversion()">确定</button>
										<button class="dsp-btn btn-white2" data-dismiss="modal">取消</button>
									</div>
								</div>
							</div>
						</div>

					</div>
				</ui-view>
			</ui-view>
		</ui-view>
	</body>

</html>
<script src="../res1.hubcloud.com.cn/lib/jquery/jquery.min.js"></script>
<script src="js/js_1.js"></script>
<script src="../res1.hubcloud.com.cn/lib/layer/layer.js"></script>
<script src="../res1.hubcloud.com.cn/lib/bootstrap/js/bootstrap.min.js"></script>

<script src="../res1.hubcloud.com.cn/lib/clipboard.min.js"></script>

<script>
	//	时间

	var page = 1; //默认页数
	var pageSize = 10; //每页条数
	var total = 0; //总条数
	//分页方法
	function paging(page, pageSize, total) {
		page = Number(page);

		//最大页数
		var maxPage = Math.ceil(total / pageSize) || 1;
		if(page > maxPage) {
			//取值不能超过maxPage
			page = Math.min(page, maxPage);
			tiaozhuan(param, page, pageSize);
		} else if(page < 1) {
			//取值不能小于1
			page = Math.max(page, 1);
			tiaozhuan(param, page, pageSize);
		} else {
			//	当前页数
			$('.ui-paging-count').val(page);
			//首页的置灰处理
			$('.js-page-first').removeClass('ui-pager-disabled');
			//上一页
			$('.js-page-prev').removeClass('ui-pager-disabled').attr("data-page", page - 1);
			//下一页
			$('.js-page-next').removeClass('ui-pager-disabled').attr("data-page", page + 1);
			//最末页
			$('.js-page-last').removeClass('ui-pager-disabled').attr("data-page", maxPage);
			//总页数显示
			$('.js-page-total').text(maxPage);

			//当前显示多少页的处理
			$(".ui-select-pagesize").val(pageSize);
			//第一页的处理
			if(page == 1) {
				$(".js-page-first").addClass('ui-pager-disabled').attr("data-page", "");
				$(".js-page-prev").addClass('ui-pager-disabled').attr("data-page", "");
			}
			if(page == maxPage) {
				//最后一页的处理
				$(".js-page-last").addClass('ui-pager-disabled').attr("data-page", "");
				$(".js-page-next").addClass('ui-pager-disabled').attr("data-page", "");
			}
		}

	};
	//下拉选择分页条数的操作
	$('.ui-select-pagesize').on("change", function() {
		pageSize = $(this).val();
		tiaozhuan(param, page, pageSize);
	});

	//跳转到X页  blur
	$(".ui-paging-count").on("blur", function() {
		page = $(this).val();
		tiaozhuan(param, page, pageSize);
	});

	//上一页，下一页，首页，最末页的跳转
	$('.ui-pager').on("click", function() {
		page = $(this).attr("data-page");
		tiaozhuan(param, page, pageSize);
	});

	//角色名查找
	//$('.clickFunc').on("click", function() {
	//	roleName1 = $('#searchRalename').val();
	//	tiaozhuan(param, page, pageSize, beginTime, endTime, type);
	//});

	function tiaozhuan(param, page, pageSize) {
		var html = "";
		method = "post";
		datas = { page: page, pageSize: pageSize };
		getAgentMsg(param, method, datas);
		console.log(dataResult);
		for(var i = 0; i < dataResult.data.rows.length; i++) {
			var isOpen = "";
			if(dataResult.data.rows[i].state == 1) {
				isOpen = "open";
			}
			//icon-open
			html += "<tr><td><span class='close fl showopen' data-open='0'></span></td>";
			html += "<td><div class='switch " + isOpen + "' data-status='" + dataResult.data.rows[i].state + "' data-id='" + dataResult.data.rows[i].id + "'></div></td>";
			html += "<td>" + dataResult.data.rows[i].superviseName + "</td>";
			html += "<td>" + dataResult.data.rows[i].superviseUrl + "</td>";
			html += "<td><a href='javascript:;' onclick='showCode()'>获取代码</a>";
			html += "&nbsp;&nbsp;<a href='javascript:;' onclick='showMask(this)' data-id='" + dataResult.data.rows[i].id + "'>创建转化监测点</a>";
			html += "</td></tr>";
			html += "<tr class='ng-hide'><td class='table-td' colspan='99'><table><thead><tr><th>转化监测点序号</th><th>转化监测点名称</th><th>备注</th><th>操作</th></tr></thead><tbody>";

			if(dataResult.data.rows[i].transformList) {
				for(var k = 0; k < dataResult.data.rows[i].transformList.length; k++) {
					var isID = Number(k)+1;
					html += "<tr><td>" + isID + "</td>";
					html += "<td>" + dataResult.data.rows[i].transformList[k].transformName + "</td>";
					html += "<td>" + dataResult.data.rows[i].transformList[k].remark + "</td>";
					html += "<td><a href='javascript:;' onclick='showCode()'>获取代码</a></td></tr>";
				}
			}
			html += "</tbody></table></td></tr>";

		}
		$(".roleList").html(html);
		//之后处理分页
		total = dataResult.data.total;
		paging(page, pageSize, total);

		$('.showopen').on('click', function() {
			var dataopen = $(this).attr("data-open");
			if(dataopen == 0) {
				$(this).parent().parent().next().show();
				$(this).addClass("icon-open").attr("data-open", 1);
			} else {
				$(this).parent().parent().next().hide();
				$(this).removeClass("icon-open").attr("data-open", 0);
			}
		});

		//修改状态
		$(".switch ").on("click", function() {
			var userStatus = $(this).attr("data-status");
			if(userStatus == 1) {
				userStatus = 0;
			} else {
				userStatus = 1;
			}
			$(this).attr("data-status", userStatus);
			$(this).toggleClass("open");
			//执行修改状态的ajax
			var param2 = "/advertiser/adSuperviseInfo/updateAdSupervise";
			var method2 = "post";
			var userId = $(this).attr("data-id");

			var datas2 = { id: userId, state: userStatus };

			$.ajax({
				url: url + param2,
				type: method2,
				dataType: 'json',
				data: JSON.stringify(datas2),
		
				contentType: "application/json",
				useDefaultXhrHeader: false,
				 beforeSend: function(XMLHttpRequest) {
					XMLHttpRequest.setRequestHeader("X-Token", token); 
				},
				success: function(result) {
					if(result.code == '0') {
						layer.msg(result.msg);
						//				console.log(dataResult);
					} else {
						isErr(result);
					}
				},
				err: function(err) {
					layer.msg("请求失败");
				}
			});
	

		});
	}

	//初始化加载数据
	window.onload = function() {
		param = "/advertiser/adSuperviseInfo/queryAdSuperviseInfoPage";
		tiaozhuan(param, page, pageSize);

	}
</script>
<script>
	//复制功能
	var clipboard = new Clipboard('#deorilink');

	clipboard.on('success', function(e) {
		var msg = e.trigger.getAttribute('aria-label');
		layer.msg(msg);

		e.clearSelection();
	});
	clipboard.on('error', function(e) {
		// alert("请选择“拷贝”进行复制!")
		var str = $("#foo").val();
	});
	//复制功能结束

	//
	//  var page = 1;             //第几页
	//  var pageSize = 20;         //一页多少条
	var state = null; //全部审核状态
	var name = ""; //素材创意名称
	var allPageNum = ''; //总页数
	//  $(function () {
	//      $('.dropdown').on('click', function () {
	//          if ($(this).hasClass("open")) {
	//              $(this).removeClass('open');
	//          } else {
	//              $('.dropdown').removeClass('open');
	//              $(this).addClass('open');
	//          }
	//      })
	//
	//      getList();
	//
	//  })

	function showInfo() {
		layer.open({
			type: 1,
			title: "落地页宏替换",
			content: $('.lp-info-box'),
			area: ["672px", "534px"]
		})
	}

	function closeLayer() {
		layer.closeAll();
	}

	function showMask(type) {
		if(type == 1) {
			// vm.arrive = {};
			$("#arriveModal").modal();
		} else {
			// vm.conversion = {
			//     parentID: item.id
			// }
			let id = $(type).attr("data-id");
			sessionStorage.setItem('chuangJianZhuanHuaJianCeDianId', id);
			$("#conversionModal").modal();
		}
	}

	function addArrive() {
		let zhanDianMingCheng = $('#zhanDianMingCheng').val().trim();
		let zhanDianUrl = $('#zhanDianUrl').val().trim();

		if(!zhanDianMingCheng) return layer.msg("请输入监测站点名称！");
		if(!zhanDianUrl) return layer.msg("请输入监测站点url！");

		add(zhanDianMingCheng, zhanDianUrl);

	}

	function addConversion() {

		let jianCeDianMingCheng = $('#jianCeDianMingCheng').val().trim();
		let beiZhu = $('#beiZhu').val().trim();
		if(!jianCeDianMingCheng) return layer.msg("请输入监测站点名称！");
		if(!beiZhu) return layer.msg("请输入备注！");

		let id = sessionStorage.getItem('chuangJianZhuanHuaJianCeDianId');
		add1(id, jianCeDianMingCheng, beiZhu);
	}

	//创建到达站点
	function add(zhanDianMingCheng, zhanDianUrl) {
		var d = {};
		d.superviseName = zhanDianMingCheng;
		d.superviseUrl = zhanDianUrl;
		$.ajax({
			type: "POST",
			url: url + "/advertiser/adSuperviseInfo/addAdSuperviseInfo",

			//		参数需转为字符串
			data: JSON.stringify(d),

			//		json跨域
			dataType: 'json',
			//		contentType类型为json
			contentType: "application/json",

			//		请求头加上X-Token 
			beforeSend: function(XMLHttpRequest) {
				//		token 为页面所获取
				let token = sessionStorage.getItem("token");
				XMLHttpRequest.setRequestHeader("X-Token", token);
			},
			useDefaultXhrHeader: false,
			success: function(result) {
				console.log(result);

				$("#arriveModal,#conversionModal").modal("hide");

				if(result.code == '0') {
					layer.closeAll();
					layer.open({
						title: '提示',
						icon: '1',
						content: result.msg,
						time: 1500,
						end: function() {
							location.href = 'audiences.html';
						}
					});
				}

				// let html = '';
				// let listData=result.data;
				// listData.forEach(item => {
				//     html +=`<li  onclick="clickFuncHuo(this)" class="ng-scope">
				//                 <a data-id='${item.id}' href="javascript:;" class="ng-binding">${item.name}</a>
				//             </li>`;

				// })
				// $('#huoDongChildrenBox').append(html);        
			},
			err: function(err) {
				layer.msg("请求失败");
			},
			complete: function() {
				// $(_that).removeAttr("disabled");
			}
		});
	}

	//创建转化监测点

	function add1(id, jianCeDianMingCheng, beiZhu) {
		var d = {};
		d.superviseInfoId = id;
		d.transformName = jianCeDianMingCheng;
		d.remark = beiZhu;
		$.ajax({
			type: "POST",
			url: url + "/advertiser/adSuperviseInfo/addaddAdSupervise",

			//		参数需转为字符串
			data: JSON.stringify(d),

			//		json跨域
			dataType: 'json',
			//		contentType类型为json
			contentType: "application/json",

			//		请求头加上X-Token 
			beforeSend: function(XMLHttpRequest) {
				//		token 为页面所获取
				let token = sessionStorage.getItem("token");
				XMLHttpRequest.setRequestHeader("X-Token", token);
			},
			useDefaultXhrHeader: false,
			success: function(result) {
				console.log(result);

				// $("#arriveModal,#conversionModal").modal("hide");

				if(result.code == '0') {
					layer.closeAll();
					layer.open({
						title: '提示',
						icon: '1',
						content: result.msg,
						time: 1500,
						end: function() {
							location.href = 'audiences.html';
						}
					});
				}

      
			},
			err: function(err) {
				layer.msg("请求失败");
			},
			complete: function() {
				// $(_that).removeAttr("disabled");
			}
		});
	}

	function clickFunc(e) {
		let id = $(e).attr("data-id");
		if($(e).hasClass("open")) {
			$(e).removeClass('open');

			updateAdSupervise(id, 0)
		} else {
			$(e).addClass('open');

			updateAdSupervise(id, 1)
		}

	}

	function showCode() {
		layer.open({
			type: 1,
			title: "html代码",
			content: $('.copy-box'),
			area: ["670px", "410px"]
		})
	}

	function closeLayer() {
		layer.closeAll();
	}
		$('.user').on('click', function() {
		$(this).toggleClass('hover');
	})
	
	$('.user').mouseleave(function() {
		$(this).removeClass('hover');
	});
</script>
<script src="../../oem/js/oem.js"></script>